void
configPic(){
   set_tris_c(0b10000000);
   setup_adc_ports(NO_ANALOGS|VSS_VDD);
   setup_adc(ADC_OFF);
   setup_lcd(LCD_DISABLED);
   setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
   setup_timer_1(T1_INTERNAL|T1_DIV_BY_8);
   setup_comparator(NC_NC_NC_NC);
   setup_vref(FALSE);
   EXT_INT_EDGE(L_TO_H); 	
   enable_interrupts(INT_EXT);				//cuenta pulsos distancia
   enable_interrupts(INT_SSP);				//I2C
   enable_interrupts(INT_TIMER0);			//genera contador_pwm
   enable_interrupts(GLOBAL);
   setup_low_volt_detect(FALSE);
   setup_oscillator(OSC_8MHZ);

}
